<template>
  <!-- 设置地板 -->
  <TresMesh
    ref="plane"
    :position="new THREE.Vector3(0, 0, 0)"
    :receive-shadow="true"
  >
    <TresPlaneGeometry :args="[10, 10]"> </TresPlaneGeometry>
    <TresMeshStandardMaterial
      :color="new THREE.Color('#A6ED8E')"
      :side="THREE.DoubleSide"
    />
  </TresMesh>
  <!-- <TresMesh ref="boxRef" :scale="1" cast-shadow>
        <TresBoxGeometry :args="[1, 1, 1]" />
        <TresMeshNormalMaterial />
      </TresMesh> -->
</template>

<script setup lang="ts">
import * as THREE from "three";
import { onMounted, ref } from "vue";
const plane = ref<THREE.Mesh>();

onMounted(() => {
  plane.value?.rotateX(Math.PI / 2);
});
</script>

<style scoped></style>
